package com.dimples.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dimples.common.entity.SecurityUser;
import com.dimples.common.page.metadata.Page;
import com.dimples.common.transport.QueryRequest;
import com.dimples.system.entity.Logging;

import java.util.TimerTask;

/**
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2021/8/12
 */
public interface LoggingService extends IService<Logging> {


    /**
     * 存储操作日志
     *
     * @param log Logging
     * @return TimerTask
     */
    TimerTask saveOperaLog(Logging log);

    /**
     * 存储登陆信息
     *
     * @param securityUser SecurityUser
     * @return Logging
     */
    Logging savaLoginLog(SecurityUser securityUser);

    /**
     * 获取日志
     *
     * @param logging      Logging
     * @param queryRequest QueryRequest
     * @return Page<Logging>
     */
    Page<Logging> findLog(Logging logging, QueryRequest queryRequest);
}
